<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .p1{
            width: 100px;
            height: 100px;
            background: red;
            /* 不会脱离文档流 */
            position: static;
            left: 50px;
        }
        .p2{
            width: 100px;
            height: 100px;
            background: blue;
            /* 相对定位相对于自己文档流的位置 */
            position: relative;
            left: 20px;
            top: -10px;
        }
        .p3{
            width: 100px;
            height: 100px;
            background: green;
            /* 相对于父容器position */
            position: absolute;
            left: 80px;
            top: 30px;
        }
        .p4{
            width: 100px;
            height: 100px;
            background: yellow;
            /* 相对于浏览器屏幕定位 */
            position: fixed;
            bottom: 10px;        
        }
        .p5{
            width: 100px;
            height: 100px;
            background: pink;
            position: null;
        }
    </style>
</head>
<body>
    <div class="p1">position: static</div>
    <div class="p2">position: relative</div>
    <div class="p3">position: absolute</div>
    <div class="p4">position: fixed</div>
    <div class="p5">position: null</div>
</body>
</html>